package com.ruoyi.house_sale.service.impl;

import java.util.List;

import com.ruoyi.house_sale.domain.ProjectInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house_sale.mapper.ResearchExamMapper;
import com.ruoyi.house_sale.domain.ResearchExam;
import com.ruoyi.house_sale.service.IResearchExamService;

import javax.annotation.Resource;

/**
 * 调研答卷名称Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-28
 */
@Service
public class ResearchExamServiceImpl implements IResearchExamService 
{
    @Resource
    private ResearchExamMapper researchExamMapper;

    /**
     * 查询调研答卷名称
     * 
     * @param reseachid 调研答卷名称主键
     * @return 调研答卷名称
     */
    @Override
    public ResearchExam selectResearchExamByReseachid(Long reseachid)
    {
        return researchExamMapper.selectResearchExamByReseachid(reseachid);
    }
    /**
     * 查询调研答卷名称列表
     * 
     * @param researchExam 调研答卷名称
     * @return 调研答卷名称
     */
    @Override
    public List<ResearchExam> selectResearchExamList(ResearchExam researchExam)
    {
        return researchExamMapper.selectResearchExamList(researchExam);
    }

    @Override
    public List<ProjectInfo> findAllProject() {
        return researchExamMapper.findAllProject();
    }

    /**
     * 新增调研答卷名称
     * 
     * @param researchExam 调研答卷名称
     * @return 结果
     */
    @Override
    public int insertResearchExam(ResearchExam researchExam)
    {
        return researchExamMapper.insertResearchExam(researchExam);
    }

    /**
     * 修改调研答卷名称
     * 
     * @param researchExam 调研答卷名称
     * @return 结果
     */
    @Override
    public int updateResearchExam(ResearchExam researchExam)
    {
        return researchExamMapper.updateResearchExam(researchExam);
    }

    @Override
    public int changeinvalid(ResearchExam researchExam) {
        return researchExamMapper.updateResearchExam(researchExam);
    }

    @Override
    public int count(Long reseachid) {
        return researchExamMapper.count(reseachid);
    }

    /**
     * 批量删除调研答卷名称
     * 
     * @param reseachids 需要删除的调研答卷名称主键
     * @return 结果
     */
    @Override
    public int deleteResearchExamByReseachids(Long[] reseachids)
    {
        return researchExamMapper.deleteResearchExamByReseachids(reseachids);
    }

    /**
     * 删除调研答卷名称信息
     * 
     * @param reseachid 调研答卷名称主键
     * @return 结果
     */
    @Override
    public int deleteResearchExamByReseachid(Long reseachid)
    {
        return researchExamMapper.deleteResearchExamByReseachid(reseachid);
    }

    @Override
    public int updExamCount(int examcount, Long reseachid) {
        return researchExamMapper.updExamCount(examcount,reseachid);
    }
}
